/*
 * FormManager.h
 *
 *  Created on: Jun 17, 2011
 *      Author: ToanNhan
 */

#ifndef FORMMANAGER_H_
#define FORMMANAGER_H_

#include <FBase.h>
#include <FUi.h>
//#include "Ui/FormManager.h"


using namespace Osp::Base;
using namespace Osp::Ui::Controls;
using namespace Osp::Base::Collection;

class FormManager {
private:
	HashMapT<int, Form*> *pForms;
	result Construct();
	FormManager();
	static FormManager *pInstance;
	static Frame *pFrame;
	IListT<Form *> *pList;
public:
	result Add(int key, Form *pForm);
	result SetCurrentForm(int key);
	result GetForm(int key, Form *&pForm);
	void SetFrame(Frame *frame);
	static Frame* GetFrame(){ return pFrame;}
	static result GetInstance(FormManager *&pInstance);
	virtual ~FormManager();
};

#endif /* FORMMANAGER_H_ */
